<html>
<head><meta charset="utf-8"><title>Item-relative spans · t-compiler/wg-incr-comp · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/241847-t-compiler/wg-incr-comp/index.html">t-compiler/wg-incr-comp</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/241847-t-compiler/wg-incr-comp/topic/Item-relative.20spans.html">Item-relative spans</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="236718226"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241847-t-compiler/wg-incr-comp/topic/Item-relative%20spans/near/236718226" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cjgillot <a href="https://rust-lang.github.io/zulip_archive/stream/241847-t-compiler/wg-incr-comp/topic/Item-relative.20spans.html#236718226">(Apr 29 2021 at 18:00)</a>:</h4>
<p>I recently submitted <a href="https://github.com/rust-lang/rust/issues/84373">#84373</a>. This PR changes the incr-comp encoding of spans to only encode the position relative to the surrounding definition. This PR unlocks some massive opportunities for incr compilation: up to 25% for cargo-check. More gains will be accessible later to a review of span usage by the MIR optimizer (for instance).</p>
<p>I am looking for a reviewer inside the work-group to evaluate the soundness of the design.</p>



<a name="236718911"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241847-t-compiler/wg-incr-comp/topic/Item-relative%20spans/near/236718911" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oliver <a href="https://rust-lang.github.io/zulip_archive/stream/241847-t-compiler/wg-incr-comp/topic/Item-relative.20spans.html#236718911">(Apr 29 2021 at 18:04)</a>:</h4>
<p>does this affect multithreaded builds?</p>



<a name="236719188"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241847-t-compiler/wg-incr-comp/topic/Item-relative%20spans/near/236719188" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cjgillot <a href="https://rust-lang.github.io/zulip_archive/stream/241847-t-compiler/wg-incr-comp/topic/Item-relative.20spans.html#236719188">(Apr 29 2021 at 18:06)</a>:</h4>
<p>Theoretically, yes.</p>



<a name="236719574"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241847-t-compiler/wg-incr-comp/topic/Item-relative%20spans/near/236719574" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oliver <a href="https://rust-lang.github.io/zulip_archive/stream/241847-t-compiler/wg-incr-comp/topic/Item-relative.20spans.html#236719574">(Apr 29 2021 at 18:09)</a>:</h4>
<p>if theoretical then no implementation</p>



<a name="236734612"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241847-t-compiler/wg-incr-comp/topic/Item-relative%20spans/near/236734612" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cjgillot <a href="https://rust-lang.github.io/zulip_archive/stream/241847-t-compiler/wg-incr-comp/topic/Item-relative.20spans.html#236734612">(Apr 29 2021 at 19:52)</a>:</h4>
<p>What do you mean?</p>



<a name="236752215"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241847-t-compiler/wg-incr-comp/topic/Item-relative%20spans/near/236752215" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oliver <a href="https://rust-lang.github.io/zulip_archive/stream/241847-t-compiler/wg-incr-comp/topic/Item-relative.20spans.html#236752215">(Apr 29 2021 at 21:42)</a>:</h4>
<p>does this pr actually involve multithreading rustc, or would that be an extension of the pr and this topic?</p>



<a name="236752252"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241847-t-compiler/wg-incr-comp/topic/Item-relative%20spans/near/236752252" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oliver <a href="https://rust-lang.github.io/zulip_archive/stream/241847-t-compiler/wg-incr-comp/topic/Item-relative.20spans.html#236752252">(Apr 29 2021 at 21:42)</a>:</h4>
<p>I think no</p>



<a name="236868157"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241847-t-compiler/wg-incr-comp/topic/Item-relative%20spans/near/236868157" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cjgillot <a href="https://rust-lang.github.io/zulip_archive/stream/241847-t-compiler/wg-incr-comp/topic/Item-relative.20spans.html#236868157">(Apr 30 2021 at 17:05)</a>:</h4>
<p>The modification is independent of multithreading, and should apply to both single and multi thread versions equally.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>